<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateTableTranslateSections extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('translate_sections', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('topic_id')->comment('topic表记录id');
            $table->text('original_text')->comment('翻译原文');
            $table->text('original_text_html')->comment('翻译原文html');
            $table->text('translate_text')->nullable()->comment('翻译译文');
            $table->text('translate_text_html')->nullable()->comment('翻译译文html');
            $table->text('translate_record_id')->nullable()->comment('译文对应的record id');
            $table->boolean('is_translated')->default(false)->comment('是否已翻译');
            $table->string('translator_ids')->nullable()->comment('翻译人员id');
            $table->integer('translator_count')->defaut(0)->comment('翻译人员数目');
            $table->timestamp('locked_date')->nullable()->comment('锁定时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('translate_sections');
    }
}
